//
//  PublicConfig.h
//  TUIKitCategory
//
//  Created by txj on 2017/3/13.
//  Copyright © 2017年 hs. All rights reserved.
//

#ifndef PublicConfig_h
#define PublicConfig_h


// 对于block的弱引用
#define kWeakSelf __weak __typeof(self)weakSelf = self;


//系统版本号
#define SYSTEM_VERSION [[[UIDevice currentDevice] systemVersion] floatValue]

//字体颜色
#define FONT_LIGHT(s) SYSTEM_VERSION<9.0? [UIFont fontWithName: @"STHeitiSC-Light" size: s]:[UIFont fontWithName: @"PingFangSC-Light" size: s]
#define FONT_REGULAR(s) SYSTEM_VERSION<9.0? [UIFont fontWithName: @"Heiti SC" size: s]:[UIFont fontWithName: @"PingFang SC" size: s]

#define SCREEN_HEIGHT [[UIScreen mainScreen] bounds].size.height
#define SCREEN_WIDTH [[UIScreen mainScreen] bounds].size.width

#define RGBA(r, g, b, a) ([UIColor colorWithRed:(r / 255.0) green:(g / 255.0) blue:(b / 255.0) alpha:a])

#define KEY_WINDOW  [[UIApplication sharedApplication] keyWindow]

#define iOS7  ( [[[UIDevice currentDevice] systemVersion] compare:@"7.0"] != NSOrderedAscending )




#endif /* PublicConfig_h */
